package edu.wpi.cs509.representation;


/**
 * ActionEndOfGameException is an exception indicating the flag
 * has been captured indicating the end of the game.
 * @author cwinsor
 */
@SuppressWarnings("serial")
public class ActionEndOfGameException extends Exception {

	private PlayerPiece winningPiece;

	public ActionEndOfGameException( PlayerPiece winningPiece ) {
		this.winningPiece = winningPiece;
	}
	
	public boolean redWins() {
		return (winningPiece.getColor() == TeamColor.RED);
	}

	public boolean blueWins() {
		return (winningPiece.getColor() == TeamColor.BLUE);
	}

}
